<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$smarty.const.Site_Name}</title>
<link href="css/public.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Js/menu.js"></script>
<script type="text/javascript" src="Js/exec.js"></script>
</head>

<body>
{include file="header.html"}
<div class="center">
	<div class="left">{include file="menu.html"}</div>
	<div class="right">
		<div class="Nav">
			<ul>
				{if $BTP[$get.open].log}<li><a href="{write_url url=$thisurl action='log' DEL='ALL'}" {CLASS_COLOR log=$get.action CLASS='this'}>API日志</a></li>{/if}
				{if $BTP[$get.open].add}<li><a href="{write_url url=$thisurl action='add' DEL='ALL'}" {CLASS_COLOR add=$get.action CLASS='this'}>添加API用户</a></li>{/if}
				{if $BTP[$get.open].show}<li><a href="{write_url url=$thisurl action='show' DEL='ALL'}" {CLASS_COLOR show=$get.action CLASS='this'}>API用户列表</a></li>{/if}
			</ul>
			<span class="clear"></span>
		</div>
		<div class="append">
			<form action="{write_url url=$thisurl go='append'}" method="post">
				<table width="100%" border="0" cellspacing="1" cellpadding="0" id="tab_show">
					<tr><th colspan="2">{if $get.action != 'edit'}添加API用户{else}编辑API用户{/if}</th></tr>
					{if $get.action == 'edit'}
					<tr>
						<td align="right" height="25" class="Need">标识码</td>
						<td>{$edit.key}</td>
					</tr>
					{/if}
					<tr>
						<td align="right" width="40%" class="Need">联系人</td>
						<td><input type="text" name="name" value="{$edit.name}" style="width:250px" /></td>
					</tr>
					<tr>
						<td align="right" class="Need">代理组</td>
						<td>
						<select name="proxy_group">
							<option value="0">请选择</option>
							{foreach item=bch from=$group}<option value="{$bch.id}" {selected val=$edit.proxy_group str=$bch.id}>{$bch.name}</option>{/foreach}
						</select>
						</td>
					</tr>
					<tr>
						<td align="right">电话</td>
						<td><input type="text" name="tel" value="{$edit.tel}" style="width:250px" /></td>
					</tr>
					<tr>
						<td align="right">QQ</td>
						<td><input type="text" name="QQ" value="{$edit.QQ}" style="width:250px" /></td>
					</tr>
					<tr>
						<td align="right">电子邮箱</td>
						<td><input type="text" name="mail" value="{$edit.mail}" style="width:60%" /></td>
					</tr>
					<tr>
						<td align="right">位置</td>
						<td><span id='PROVINCE_CITY'></span></td>
					</tr>
					<tr>
						<td align="right">公司名称</td>
						<td><input type="text" name="company_name" value="{$edit.company_name}" style="width:60%" /></td>
					</tr>
					<tr>
						<td align="right">公司地址</td>
						<td><input type="text" name="company_address" value="{$edit.company_address}" style="width:60%" /></td>
					</tr>
					<tr>
						<td align="right">网站</td>
						<td><input type="text" name="home_page" value="{$edit.home_page}" style="width:60%" /></td>
					</tr>
					<tr>
						<td align="right">品牌名称</td>
						<td><input type="text" name="brand_name" value="{$edit.brand_name}" style="width:60%" /></td>
					</tr>
					<tr>
						<td align="right" class="Need">产品 加点</td>
						<td><input type="text" name="dot" value="{$edit.dot|default:0}" style="width:80px;text-align:center" onfocus="sprintf('%.2f' , this , true)" /> %</td>
					</tr>
					<tr>
						<td align="right" class="Need">产品 服务器IP</td>
						<td>
							<input type="text" name="product_ip" value="{if $edit.product_ip}{unserialize_to_string str=$edit.product_ip}{/if}" style="width:90%" />
							<div class="Hint">注：多个IP请用 , 隔开,每项最多5个IP</div>
						</td>
					</tr>
					<tr>
						<td align="right" class="Need">产品明细 服务器IP</td>
						<td><input type="text" name="detail_ip" value="{if $edit.detail_ip}{unserialize_to_string str=$edit.detail_ip}{/if}" style="width:90%" /></td>
					</tr>
					<tr>
						<td align="right" class="Need">国际报价 服务器IP</td>
						<td><input type="text" name="INTbid_ip" value="{if $edit.INTbid_ip}{unserialize_to_string str=$edit.INTbid_ip}{/if}" style="width:90%" /></td>
					</tr>
					<tr>
						<td align="right">备注</td>
						<td><textarea name="remark" style="width:80%; height:120px">{br_to_null str=$edit.remark}</textarea></td>
					</tr>
					<tr><th colspan="2" align="center"><input type="submit" value=" 提 交 " /> <input type="reset" value=" 重 填 " /></th></tr>
				</table>
			</form>
		</div>
	</div>
	<b class="clear"></b>
</div>
<script type="text/javascript" src="Js/city.js"></script>
<script type="text/javascript">set_PROVINCE_CITY('PROVINCE_CITY' , 'province' , 'city' , '{$edit.province|default:"0"}' , '{$edit.city|default:"0"}');</script>
</body>
</html>